package com.yy.web.pm.patrol.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.yy.web.pm.patrol.domain.PeoplePatrol;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.util.List;
import java.util.Objects;

@ApiModel(description = "巡逻告警数据传输对象")
public class PatrolDto extends PeoplePatrol {


    @ApiModelProperty(value = "告警ID", example = "67890")
    private String alarmID;

    @ApiModelProperty(value = "告警编号", example = "ALM-001")
    private String alarmNumber;

    @ApiModelProperty(value = "告警人", example = "张三")
    private String alarmPeople;

    @ApiModelProperty(value = "告警地址", example = "北京市朝阳区")
    private String alarmAddress;

    @ApiModelProperty(value = "告警时间", example = "2023-10-01 12:00:00")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private String alarmTime;

    @ApiModelProperty(value = "告警备注", example = "这是一个测试告警")
    private String alarmNotes;

    @ApiModelProperty(value = "告警类别", example = "紧急")
    private String alarmType;

    @ApiModelProperty(value = "告警图片URL", example = "http://example.com/image.jpg")
    private String alarmImage;

    @ApiModelProperty(value = "告警图片列表", example = "[\"http://example.com/image1.jpg\", \"http://example.com/image2.jpg\"]")
    private List<String> alarmImageList;

    @ApiModelProperty(value = "告警处理状态", example = "已处理")
    private String alarmState;

    @ApiModelProperty(value = "处理人ID", example = "54321")
    private String patrolId;

    @ApiModelProperty(value = "告警级别", example = "高")
    private String examineLevel;

    @ApiModelProperty(value = "商家ID", example = "SHOP-001")
    private String shopId;

    @ApiModelProperty(value = "告警店名", example = "某某商店")
    private String alarmShop;
    //告警数据判别字段
    private String candidate;
    // 告警级别
    private String alarmLevel;

    public String getCandidate() {
        return candidate;
    }

    public PatrolDto setCandidate(String candidate) {
        this.candidate = candidate;
        return this;
    }



    public String getAlarmLevel() {
        return alarmLevel;
    }

    public PatrolDto setAlarmLevel(String alarmLevel) {
        this.alarmLevel = alarmLevel;
        return this;
    }

    public String getAlarmID() {
        return alarmID;
    }

    public PatrolDto setAlarmID(String alarmID) {
        this.alarmID = alarmID;
        return this;
    }

    public String getAlarmNumber() {
        return alarmNumber;
    }

    public PatrolDto setAlarmNumber(String alarmNumber) {
        this.alarmNumber = alarmNumber;
        return this;
    }

    public String getAlarmPeople() {
        return alarmPeople;
    }

    public PatrolDto setAlarmPeople(String alarmPeople) {
        this.alarmPeople = alarmPeople;
        return this;
    }

    public String getAlarmAddress() {
        return alarmAddress;
    }

    public PatrolDto setAlarmAddress(String alarmAddress) {
        this.alarmAddress = alarmAddress;
        return this;
    }

    public String getAlarmTime() {
        return alarmTime;
    }

    public PatrolDto setAlarmTime(String alarmTime) {
        this.alarmTime = alarmTime;
        return this;
    }

    public String getAlarmNotes() {
        return alarmNotes;
    }

    public PatrolDto setAlarmNotes(String alarmNotes) {
        this.alarmNotes = alarmNotes;
        return this;
    }

    public String getAlarmType() {
        return alarmType;
    }

    public PatrolDto setAlarmType(String alarmType) {
        this.alarmType = alarmType;
        return this;
    }

    public String getAlarmImage() {
        return alarmImage;
    }

    public PatrolDto setAlarmImage(String alarmImage) {
        this.alarmImage = alarmImage;
        return this;
    }

    public List<String> getAlarmImageList() {
        return alarmImageList;
    }

    public PatrolDto setAlarmImageList(List<String> alarmImageList) {
        this.alarmImageList = alarmImageList;
        return this;
    }

    public String getAlarmState() {
        return alarmState;
    }

    public PatrolDto setAlarmState(String alarmState) {
        this.alarmState = alarmState;
        return this;
    }

    public String getPatrolId() {
        return patrolId;
    }

    public PatrolDto setPatrolId(String patrolId) {
        this.patrolId = patrolId;
        return this;
    }

    public String getExamineLevel() {
        return examineLevel;
    }

    public PatrolDto setExamineLevel(String examineLevel) {
        this.examineLevel = examineLevel;
        return this;
    }

    public String getShopId() {
        return shopId;
    }

    public PatrolDto setShopId(String shopId) {
        this.shopId = shopId;
        return this;
    }

    public String getAlarmShop() {
        return alarmShop;
    }

    public PatrolDto setAlarmShop(String alarmShop) {
        this.alarmShop = alarmShop;
        return this;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("alarmID", alarmID)
                .append("alarmNumber", alarmNumber)
                .append("alarmPeople", alarmPeople)
                .append("alarmAddress", alarmAddress)
                .append("alarmTime", alarmTime)
                .append("alarmNotes", alarmNotes)
                .append("alarmType", alarmType)
                .append("alarmImage", alarmImage)
                .append("alarmImageList", alarmImageList)
                .append("alarmState", alarmState)
                .append("patrolId", patrolId)
                .append("examineLevel", examineLevel)
                .append("shopId", shopId)
                .append("alarmShop", alarmShop)
                .toString();
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (!(o instanceof PatrolDto)) return false;
        PatrolDto that = (PatrolDto) o;
        return Objects.equals(alarmID, that.alarmID) && Objects.equals(alarmNumber, that.alarmNumber) &&
                Objects.equals(alarmPeople, that.alarmPeople) && Objects.equals(alarmAddress, that.alarmAddress) &&
                Objects.equals(alarmTime, that.alarmTime) && Objects.equals(alarmNotes, that.alarmNotes) &&
                Objects.equals(alarmType, that.alarmType) && Objects.equals(alarmImage, that.alarmImage) &&
                Objects.equals(alarmImageList, that.alarmImageList) && Objects.equals(alarmState, that.alarmState) &&
                Objects.equals(patrolId, that.patrolId) && Objects.equals(examineLevel, that.examineLevel) &&
                Objects.equals(shopId, that.shopId) && Objects.equals(alarmShop, that.alarmShop);
    }

    @Override
    public int hashCode() {
        return Objects.hash(alarmID, alarmNumber, alarmPeople, alarmAddress, alarmTime, alarmNotes, alarmType,
                alarmImage, alarmImageList, alarmState, patrolId, examineLevel, shopId, alarmShop);
    }
}
